/**
 * Created by chenwei on 2016/6/3.
 */
angular.module('app.order', [
])
.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
    $stateProvider
        .state('home.orderlist', {
            url: '/order/list',
            templateUrl: "tpls/order/list.html",
            resolve: {
                order_list : ['OrderService', function(OrderService){
                    return OrderService.getlist().$promise;
                }]
            },
            controller: 'OrderListController'
        })
}])

.controller('OrderListController', ['$scope','order_list', function($scope, order_list) {
    $scope.order_list = order_list;
}])
;